package com.zzt.zt_hilt.factory

import com.zzt.zt_hilt.entity.UserRepository
import com.zzt.zt_hilt.vm.LoginViewModel

/**
 * @author: zeting
 * @date: 2022/8/30
 *
 */

// Factory for LoginViewModel.
// Since LoginViewModel depends on UserRepository, in order to create instances of
// LoginViewModel, you need an instance of UserRepository that you pass as a parameter.
class LoginViewModelFactory(private val userRepository: UserRepository) : Factory<LoginViewModel> {
    override fun create(): LoginViewModel {
        return LoginViewModel(userRepository)
    }
}